package ru.elifantiev.cityrouter.infrastructure.map;

import android.view.View;
import android.widget.FrameLayout;


abstract public class AbstractMapWrapper<T extends View> implements MapWrapper {

    protected T mapContainerView;

    @SuppressWarnings("unchecked")
    public AbstractMapWrapper(ViewCache viewCache, FrameLayout container, int mapResourceId) {
        container.removeAllViews();
        container.addView(
                mapContainerView = (T)viewCache.getCachedView(mapResourceId));
    }
}
